#include "sr.h"

void
isKnownFire(char *isKnown, int *craneKnownFlags,int *cranePresentFlags) {
    
    if(GET_BIT(*craneKnownFlags, EMSTOPMERGERBIT)) {
        if(GET_BIT(*cranePresentFlags, EMSTOPMERGERBIT)) {
            *isKnown = 1;
            SET_BIT_TRUE(*craneKnownFlags, ISKNOWNBIT);
            SET_BIT_TRUE(*cranePresentFlags, ISKNOWNBIT);
        }
    }
    
    if(GET_BIT(*craneKnownFlags, EMSTOPMERGERBIT) &&
            !GET_BIT(*craneKnownFlags, ISKNOWNBIT)) { 
        SET_BIT_TRUE(*craneKnownFlags, ISKNOWNBIT);
    }

}
